package dtaskboard.client.service;

import java.util.Collection;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

import dtaskboard.client.dto.LoginDTO;
import dtaskboard.client.dto.RoleClass;
import dtaskboard.client.dto.RoleDTO;

@RemoteServiceRelativePath("login")
public interface LoginService extends RemoteService {
  public String login(String user, String password);

  public void logout(String sessionId);

  public boolean isAuthenticated(String sessionId);

  public Collection<RoleDTO> getUserRoles(String sessionId);

  public void saveUser(String username, String password, String name,
      String sessionId);

  public void addRoleToUser(String username, RoleClass role,
      String projectName, String sessionId);

  public LoginDTO getLoginDTO(String sessionId);

  public void changePassword(String oldPass, String newPass, String sessionId);
}
